package com.anysoft.greenDAO.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.anysoft.bean.PwdBean;
import com.anysoft.bean.UserBean;

import com.anysoft.greenDAO.dao.PwdBeanDao;
import com.anysoft.greenDAO.dao.UserBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig pwdBeanDaoConfig;
    private final DaoConfig userBeanDaoConfig;

    private final PwdBeanDao pwdBeanDao;
    private final UserBeanDao userBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        pwdBeanDaoConfig = daoConfigMap.get(PwdBeanDao.class).clone();
        pwdBeanDaoConfig.initIdentityScope(type);

        userBeanDaoConfig = daoConfigMap.get(UserBeanDao.class).clone();
        userBeanDaoConfig.initIdentityScope(type);

        pwdBeanDao = new PwdBeanDao(pwdBeanDaoConfig, this);
        userBeanDao = new UserBeanDao(userBeanDaoConfig, this);

        registerDao(PwdBean.class, pwdBeanDao);
        registerDao(UserBean.class, userBeanDao);
    }
    
    public void clear() {
        pwdBeanDaoConfig.getIdentityScope().clear();
        userBeanDaoConfig.getIdentityScope().clear();
    }

    public PwdBeanDao getPwdBeanDao() {
        return pwdBeanDao;
    }

    public UserBeanDao getUserBeanDao() {
        return userBeanDao;
    }

}
